Because credit2 shares a runqueue between several cpus, it needs
to know when a scheduled-out process has finally been context-switched
away so that it can be added to the runqueue again. (Otherwise it may
be grabbed by another processor before the context has been properly
saved.)
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
/* Check for migration request /after/ clearing running flag. */
smp_mb();
+ SCHED_OP(context_saved, prev);
+
if ( unlikely(test_bit(_VPF_migrating, &prev->pause_flags)) )
vcpu_migrate(prev);
}
void (*sleep) (struct vcpu *);
void (*wake) (struct vcpu *);
+ void (*context_saved) (struct vcpu *);
struct task_slice (*do_schedule) (s_time_t);